<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE HTML>
<html>
<head>
<title>Simple Login Form</title>
<meta charset="UTF-8" />
<meta name="Designer" content="PremiumPixels.com">
<meta name="Author" content="$hekh@r d-Ziner, CSSJUNTION.com">
<link rel="stylesheet" type="text/css" href="css/reset.css">
<link rel="stylesheet" type="text/css" href="css/structure.css">
<script type="text/javascript" src="js/jquery.js"></script>
</head>

<body>
<form class="box login" action="login.action" method="post">
	<fieldset class="boxBody">
	  <c:choose>
  		<c:when test="${param.code == '10001'}">
  			<div style="color:red">用户名或密码错误</div>
  		</c:when>
  		<c:when test="${param.code == '10002' }">
  			<div style="color:red">请先登录</div>
  		</c:when>
  		<c:when test="${param.code == '10003' }">
  			<div style="color:red">验证码错误</div>
  		</c:when>
  	  </c:choose>	
	  <label>用户名</label>
	  <input type="text" id="username" name="user.username" tabindex="1" placeholder="用户名" required>
	  <p class="help-block" id="username_error"></p>
	  <label><a href="#" class="rLink" tabindex="5">忘记密码?</a>密码</label>
	  <input type="password" id="password" name="user.password" tabindex="2" placeholder="密码" required>
	  <p class="help-block" id="password_error"></p>
	</fieldset>
	<footer>
	  <input type="submit" class="btnLogin" value="登陆" tabindex="4">
	</footer>
</form>


<div style="display: none">
    <script language="javascript" type="text/javascript" src="http://js.users.51.la/4473358.js"></script>
    <script type="text/javascript">
        var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
        document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Fadd0db9dee36c7a9b64141788e26de72' type='text/javascript'%3E%3C/script%3E"));

</script>

    <script type="text/javascript">
    	$(document).ready(function(){
    		
    		$("#username").blur(function(){
    			var username = $(this).val();
   				if (username == "") {
   					$("#username_error").css({color:"red"}).text("用户名不能为空");
   				} else {
   					$("#username_error").text("");
   				}
    		});
   		
   			$("#password").blur(function(){
   				var password = $(this).val();
   				if (password == "") {
   					$("#password_error").css({color:"red"}).text("密码不能为空");
   				} else {
   					$("#password_error").text("");
   				}
   			});
    	});
    			
        /*var _gaq = _gaq || [];
        _gaq.push(['_setAccount', 'UA-21395429-1']);
        _gaq.push(['_trackPageview']);

        (function () {
            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
        })();*/
		
</script>
    </div>
<footer id="main">
  <a href="http://wwww.cssjunction.com">Simple Login Form (HTML5/CSS3 Coded) by CSS Junction</a> | <a href="http://www.premiumpixels.com">PSD by Premium Pixels</a>
</footer>
</body>
</html>
